package com.service.impl;

import com.dao.CollectRecordDAO;
import com.model._do.CollectResultDO;
import com.service.CollectResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("collectResultService")
public class CollectResultServiceImpl implements CollectResultService {

    @Autowired
    private CollectRecordDAO collectRecordDAO;

    @Override
    public void saveNewCollect(CollectResultDO collect) {
        collectRecordDAO.pushNewCollect(collect);
    }

    @Override
    public List<CollectResultDO> getCollectByEquipId(String equipId) {
        return collectRecordDAO.selectLatestCollectByEquipId(equipId);
    }


}
